package com.jy.rhin.parse;


import com.jy.rhin.infra.cda.XPath;
import org.seimicrawler.xpath.JXNode;
import org.springframework.stereotype.Component;

import java.util.Objects;
/**
 * @Author 姚俊
 * @Date 2023/2/16 16:29
 * @Description
 */
@Component
public class ItemSTSelector implements Selector {

    @Override
    public String selectValue(JXNode root, XPath xPath) {
        JXNode jxNode = root.selOne("/value");
        if (Objects.nonNull(jxNode)) {
            return jxNode.asElement().text();
        }
        return "";
    }

}
